import {get,post,deleteRequest} from '@/utils/request'

const workOrder = {
  list:'/settlment/list',
  settlement:'/settlment/closed/getById',
  updateItems:'/repair/part/updatePart',
  addParts:'/warehouse/acc/urgent',
  deleteParts:'/warehouse/acc/urgent/delete',
  carInfo:'/carInfo',
  getOrderInfo:'/settlment/closed/getprintbyid',
  addRepairType:'/repair/type',
  addPayment:'/repair/payment',
  uploadImg:'/repairattach/save',
  updateJc:'/settlment/updateJc'
}

export function getListbyPage(param){
  return get(workOrder.list,param);
}

export function getSettlementById(param){
  return get(workOrder.settlement,param)
}

export function updateItems(param){
  return post(workOrder.updateItems,param)
}

export function addParts(param){
  return post(workOrder.addParts,param)
}

export function deleteParts(param){
  return deleteRequest(workOrder.deleteParts,param)
}

export function getCarInfo(param){
  return get(workOrder.carInfo,param)
}

export function getOrderInfo(param){
  return get(workOrder.getOrderInfo,param)
}

export function addRepairType(param){
  return get(workOrder.addRepairType,param)
}

export function addPayment(param){
  return get(workOrder.addPayment,param)
}

export function uploadImg(param){
  return post(workOrder.uploadImg,param)
}

export function updateJc(param){
  return post(workOrder.updateJc,param)
}

